<template>
		<view class="img_head_picture">
			<view class="bg_img">
				<image :src="general_top_bg" mode=""></image>
			</view>
			<view class="main_txt">
				<text class="title">{{header_title}}</text>
				<view class="title_bottom">
					<view class="img_box">
						<!-- <image  src="https://elite-league.oss-cn-shanghai.aliyuncs.com/miniapp-service/static/Bitmap.png" mode=""></image> -->
						<image  :src="customer_avatar"></image>
						<!-- <image v-else :src="headData.avatar" mode=""></image> -->
					</view>
					<view class="text_box">
						<text class="teacher-name">{{parent_name}}家长</text>
						<view class="statistical">
							<text>{{header_content}}</text>
						</view>
					</view>
				</view>
				<view v-if='showReturn' class="img-box-position" @click="return_on" >
					<image class="return-img" src="https://storage.ganorglobal.com/miniapp-service/static/fanhui.png" mode=""></image>返回
				</view>
			</view>
		</view>
</template>

<script>
	export default {
		props:{
			parent_name:{
				type: String,
				default: ''
			},
			header_content:{
				type: String,
				default: ''
			},
			header_title:{
				type: String,
				default: ''
			},
			showReturn:{
				type:Boolean,
				default:true,
			}
		},
		
		data(){
			return {
				//title: '签到',
				// parent_name: '张晓晓',
				time: 12,
				customer_avatar : this.config.DEFAULT_CUSTOMER_AVATAR,
				general_top_bg: this.config.DEFAULT_CHIRDREN_TY
			}
		},
		mounted() {
			this.customer_avatar = this.config.DEFAULT_CUSTOMER_AVATAR
		},
		methods:{
			return_on(){
				uni.navigateBack({
						delta: 1
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
.img_head_picture {
		position: relative;

		.img-box-position {
			position: absolute;
			display: flex;
			justify-content: space-between;
			align-items: center;
			left: 20rpx;
			top: 52rpx;
			width:100rpx;
			height:120rpx;
		

			.return-img {
				width: 14rpx;
				height: 26rpx;
				display: inline-block;
				margin: 1rpx auto;
			}
		}
	}
	.img_head_picture {
		width: 100%;
		height: 332rpx;
		.bg_img{
			position: relative;
			width:100%;
			image{
				width:100%;
				height: 332rpx;
				position: absolute;
				top:0;
			}
		}
		.main_txt{
			position: relative;
		}
		.title {
			font-size: 34rpx;
			font-family: PingFangSC-Semibold, PingFang SC;
			font-weight: 600;
			color: rgba(255, 255, 255, 1);
			display: block;
			text-align: center;
			padding-top: 56rpx;
		}
		.title_bottom {
			display: flex;
			margin: 30rpx 0 0 70rpx;
			align-items: center;
			.img_box {
				width: 120rpx;
				height:120rpx;
				image {
					width: 120rpx;
					height: 120rpx;
					border-radius: 50%;
				}
			}
			.text_box {
				margin-left: 24rpx;
				.teacher-name {
					font-size: 36rpx;
					font-family: PingFangSC-Semibold, PingFang SC;
					font-weight: 600;
					color: rgba(255, 255, 255, 1);
					display: block;
				}
				.statistical {
					display: flex;
					align-items: center;
					image {
						display: block;
						width: 32rpx;
						height: 28rpx;
						margin-right: 16rpx;
					}
					text {
						display: block;
						font-size: 28rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: rgba(255, 255, 255, 1);
					}
				}
			}
		}
	}
</style>
